package imPro;

/**
 *
 * @author Ragnar
 */
public class UpdateImPanel implements Runnable
{
    private ImPanel panel;
    private Common source;
    
    public UpdateImPanel(ImPanel ip, Common src)
    {
        this.panel = ip;
        this.source = src;
        Thread t = new Thread(this);
        t.start();
    }
    
    public void run()
    {
        while (true)
        {
            this.panel.setImage(this.source.getImage());
            
            try
            {
                Thread.sleep(100);
            }
            catch (InterruptedException e) {}
        }
    }
}
